package com.fh.model.system;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by dell、 on 2017/5/13.
 */
public class ExcelRecord{
    private String fileName;
    private String sheetName;
    private String[] columnNames;
    private String[] keys;
    private List<Map<String,String>> data;

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getSheetName() {
        return sheetName;
    }

    public void setSheetName(String sheetName) {
        this.sheetName = sheetName;
    }

    public String[] getColumnNames() {
        return columnNames;
    }

    public void setColumnNames(String[] columnNames) {
        this.columnNames = columnNames;
    }

    public String[] getKeys() {
        return keys;
    }

    public void setKeys(String[] keys) {
        this.keys = keys;
    }

    public List<Map<String, String>> getData() {
        return data;
    }

    public void setData(List<Map<String, String>> data) {
        Set  set = data.get(0).keySet();
        this.setKeys((String[])(set.toArray(new String[set.size()])));
        this.data = data;
    }
}
